package com.example.demo.fallback;

import com.example.demo.feign.OrderService;
import com.example.demo.web.AjaxResult;

public class OrderServiceFallback implements OrderService {
    private Throwable throwable;

    OrderServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public AjaxResult order(String userId, String commodityCode, int orderCount) {
        return AjaxResult.error("订单服务降级" + throwable.getMessage());
    }
}
